import AppointOrderModel from '../model/appointOrder';

export async function AddOrder(platform: string,appointDate: string, appointTime: string, touristInfo: string, createUser: string) {
  let data: any = { appointDate, appointTime, touristInfo, createUser, platform };
  const model2 = await AppointOrderModel.insert(data);
}

export async function UpdateOrder(data: any, id) {
  // let data: any = { appointDate, appointTime, touristInfo, touristNum, platform };
  const model2 = await AppointOrderModel.update(data, id);
}

export async function GetOrder(id: number) {
  return AppointOrderModel.findOne(id);
}

export async function GetOrderList(pageindex: string | undefined, platform, createUser) {
  return AppointOrderModel.getlist(Number(pageindex || 1), platform, createUser);
}

export async function DeleteTaskList(ids: string[], uuid: string) {
  if (ids.length === 0) return;
  await AppointOrderModel.delList(ids);
    // UserLogs('删除用户', '', ids.join(), 1, uuid);
}
